package com.authine.cloudpivot.ext.controller.file;

import javax.servlet.http.HttpServletResponse;

import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.authine.cloudpivot.web.api.controller.OSSController;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;

/**
 * 附件操作接口
 * 
 * @author shinka
 * @date 2021/07/02
 */
@Api(value = "附件操作接口", tags = "01::EXTAPI::附件操作接口")
@Controller
@RequestMapping("/public/ext/file")
// @CustomizedOrigin(level = 1)
@Primary
public class AttachmentController extends OSSController {

    @GetMapping(value = "/download")
    @ResponseBody
    @ApiOperation(value = "免登附件下载接口")
    @ApiImplicitParam(name = "refId", value = "资源id", required = true, dataType = "String", paramType = "query")
    @Override
    public void download(@RequestParam String refId, HttpServletResponse response) {
        super.download(refId, response);
    }

}
